/*
 * @Author: Bo Cai
 * @Mail: caibo0520@qq.com
 * @Date: 2021-10-04 22:19:22
 * @LastEditors: Bo Cai
 * @LastEditTime: 2021-12-03 23:40:21
 */
import request from '@/utils/request'
const api_name = '/edu-service/teacher'
export default {
    getListPage(currentPage, limit, teacherQuery) {
        return request({
            url: `${api_name}/page-query/${currentPage}/${limit}`,
            method: 'post',
            data: teacherQuery
        })
    },
    deleteById(id) {
        return request({
            url: `${api_name}/delete-by-id/${id}`,
            method: 'delete'
        })
    },
    save(teacher) {
        return request({
            url: `${api_name}/save`,
            method: 'post',
            data: teacher
        })
    },
    getById(id) {
        return request({
            url: `${api_name}/${id}`,
            method: 'get'
        })
    },
    updateById(teacher) {
        return request({
            url: `${api_name}/${teacher.id}`,
            method: 'put',
            data: teacher
        })
    },
    getList() {
        return request({
            url: api_name,
            method: 'get'
        })
    },
}
